import {defineStore} from "pinia"

export const useDataStore = defineStore("login", {
    state: () => {
        return {
            isLogin: false,//是否登录
            adminId:'',//用户id
            adminName: "",//用户名
            adminImg: '',//用户头像

            isCollapse: false,//菜单是否折叠
            breadcrumb: "首页",//面包屑
            toggleStore: true,//抽屉开关

            fastdfsUploadUrl: 'http://localhost:8001/file/fastdfs/upload'

        }
    },
    persist: {
        enabled: true,//是否开启持久化
        strategies: [
            {
                key: 'data', //自定义Key值,存储到本地时的key
                storage: localStorage, // 选择存储方式：本地存储
            },
        ],
    }
})
